package com.book.service.impl;

import com.book.model.Menu;
import com.book.mapper.MenuDao;
import com.book.service.MenuService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wx
 * @since 2023-10-12 10:33:30
 */
@Service
public class MenuServiceImpl extends ServiceImpl<MenuDao, Menu> implements MenuService {
    @Autowired
    private MenuDao menuDao;
    @Override
    public void addMenu(Menu menu) {
        menuDao.insert(menu);
    }

    @Override
    public void updateMenu(Menu menu) {
        menuDao.updateById(menu);
    }

    @Override
    public void deleteMenu(Long mid) {
        menuDao.deleteById(mid);
    }
}
